<template>
<div>
  <div v-for="(item,index) in foodData">
    <span >{{item.foodName}}</span><br>
  </div>
</div>
</template>

<script>
export default {
  name: "ZhushiView",
  data(){
    return{
      foodData:[]
    }
  },
  methods:{
    initData(){
      var id = this.$route.query.id;
      this.axios.get("http://localhost:8084/food/getFoodByCateId?id="+id).then(resp=>{
        this.foodData=resp.data
      })
    }
  },
  created() {
    this.initData();
  }
}
</script>

<style scoped>

</style>